package com.u2ds.core.exception;

public class BaseRuntimeException extends RuntimeException {
	
	public static final String[] DEFAULT_PARAMS = new String[]{};
	private String code = "error.default";
	private String[] params;
	
	public String getCode(){
		return code;
	}
	
	public String[] getParams() {
        return params;
    }

    public void setParams(String[] params) {
        this.params = params;
    }
    
    public BaseRuntimeException(String code, String[] params) {
       this(code, params, null);
    }

    public BaseRuntimeException(String code, String[] params, Exception e) {
        super(code, e);
        this.code = code;
        this.params = params;
    }
    
    public BaseRuntimeException(String code) {
        this(code, DEFAULT_PARAMS,null);
    }
}
